#include <iostream>
#define INF 0x3f3f3f3f
#define MAXN 10
using namespace std;
int n, m, a, b;
int t[MAXN], d[MAXN][MAXN];
double dp[1 << MAXN][MAXN]; // 到达剩下的车票集合为S, 并且处于城市v的最小花费.

void solve() {
    for (int i = 0; i < 1 << n; i++) {
        fill(dp[i], dp[i] + m, INF);
    }
    dp[(1 << n) - 1][a - 1] = 0;
    double res = INF;
    for (int S = (1 << n) - 1; S >= 0; S--) {
        res = min(res, dp[S][b - 1]);
        for (int v = 0; v < m; v++) {
            for (int i = 0; i < n; i++) {
                if (S >> i && 1) {
                    for (int u = 0; u < m; u++) {
                        if (dp[v][u] >= 0) {
                            dp[S & ~(1 << i)][u] = min(dp[S & ~(1 << i)][u], dp[S][v] + (double) d[v][u] / t[i]);
                        }
                    }
                }
            }
        }
    }
    if (res == INF)
        cout << "IMPOSSIBLE" << endl;
    else cout << res << endl;
}
